gtk/tests: Fix for -Wmissing-declarations
authorBenjamin Otte <otte@redhat.com>
Tue, 2 Oct 2012 17:30:50 +0000 (19:30 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 2 Oct 2012 17:32:53 +0000 (19:32 +0200)
I'm adding a bunch of fixes for gcc complaining about
-Wmissing-declarations after finding a bunch of cases today where I
had forgotten to make functions static in the CSS code.

This patch fixes the tests in gtk/tests.

After this last patch, the gtk/ subdir should now compile without
warnings when this flag is enabled.

gtk/tests/builder.c
gtk/tests/cellarea.c
gtk/tests/rbtree.c
gtk/tests/stylecontext.c
gtk/tests/treestore.c

index 563d422b216cc5a628bf9bdc420a5a2b64395a68..d5a3d1ffc21500e72839c882a86dd629c513c149 100644 (file)
 #include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 
+/* exported for GtkBuilder */
+void signal_normal (GtkWindow *window, GParamSpec spec);
+void signal_after (GtkWindow *window, GParamSpec spec);
+void signal_object (GtkButton *button, GParamSpec spec);
+void signal_object_after (GtkButton *button, GParamSpec spec);
+void signal_first (GtkButton *button, GParamSpec spec);
+void signal_second (GtkButton *button, GParamSpec spec);
+void signal_extra (GtkButton *button, GParamSpec spec);
+void signal_extra2 (GtkButton *button, GParamSpec spec);
+
 /* Copied from gtkiconfactory.c; keep in sync! */
 struct _GtkIconSet
 {
index 471ea74eaff6c3b259d3edcf685886225497a847..98072ed046f1678a01a82e8ed47e8deeacb192ab 100644 (file)
@@ -78,6 +78,8 @@ test_iconview_object_new (void)
 typedef GtkIconView MyIconView;
 typedef GtkIconViewClass MyIconViewClass;
 
+GType my_icon_view_get_type (void);
+
 G_DEFINE_TYPE (MyIconView, my_icon_view, GTK_TYPE_ICON_VIEW)
 
 static void
@@ -234,6 +236,8 @@ test_combobox_object_new (void)
 typedef GtkComboBox MyComboBox;
 typedef GtkComboBoxClass MyComboBoxClass;
 
+GType my_combo_box_get_type (void);
+
 G_DEFINE_TYPE (MyComboBox, my_combo_box, GTK_TYPE_COMBO_BOX)
 
 static void
@@ -390,6 +394,8 @@ test_cellview_object_new (void)
 typedef GtkCellView MyCellView;
 typedef GtkCellViewClass MyCellViewClass;
 
+GType my_cell_view_get_type (void);
+
 G_DEFINE_TYPE (MyCellView, my_cell_view, GTK_TYPE_CELL_VIEW)
 
 static void
@@ -544,6 +550,8 @@ test_column_object_new (void)
 typedef GtkTreeViewColumn MyTreeViewColumn;
 typedef GtkTreeViewColumnClass MyTreeViewColumnClass;
 
+GType my_tree_view_column_get_type (void);
+
 G_DEFINE_TYPE (MyTreeViewColumn, my_tree_view_column, GTK_TYPE_TREE_VIEW_COLUMN)
 
 static void
@@ -698,6 +706,8 @@ test_completion_object_new (void)
 typedef GtkEntryCompletion MyEntryCompletion;
 typedef GtkEntryCompletionClass MyEntryCompletionClass;
 
+GType my_entry_completion_get_type (void);
+
 G_DEFINE_TYPE (MyEntryCompletion, my_entry_completion, GTK_TYPE_ENTRY_COMPLETION)
 
 static void
index 84b752b8fba8e181ca32a80f44bef27aab01a7a0..6f79df7b07c2241111c0c051f69d57e70d062dfb 100644 (file)
@@ -198,7 +198,7 @@ _gtk_rbtree_test_structure (GtkRBTree *tree)
   _gtk_rbtree_test_structure_helper (tree, tree->root);
 }
 
-void
+static void
 _gtk_rbtree_test (GtkRBTree *tree)
 {
   GtkRBTree *tmp_tree;
index a3a1e221650ddcb87f74f3ccd4bce489c1cbade9..3435ce41a1534e9c8eebbc5c6e7697e9af5c4f63 100644 (file)
@@ -313,7 +313,7 @@ test_style_property (void)
   g_object_unref (context);
 }
 
-void
+static void
 test_basic_properties (void)
 {
   GtkStyleContext *context;
index dee0f6d22ab0d48ad28a829c059448468eb1899d..d19297f5bf5b766a9a8f9b29a28601cb9f02bfbf 100644 (file)
@@ -26,6 +26,8 @@
  *  - And we also need tests for creating these child levels, etc.
  */
 
+#include "treemodel.h"
+
 #include <gtk/gtk.h>
 
 static inline gboolean